<?php


abstract class Globals {
    const SF_ENVIRONMENT_PROD = 'prod';
    const SF_ENVIRONMENT_DEV = 'dev';
    const SF_ENVIRONMENT_TEST = 'test';

    const SYSTEM_USER_ID = '0';
    const SYSTEM_COMPANY_DIST_ID = '0';
    const SYSTEM_CAPTCHA_ID = 'captcha_id';

    const FULL_DATETIME_FORMAT = 'l j F, Y g:i a';
    const BONUS_MAINTENANCE_PERCENTAGE = 0.2;

    const _YES = 1;
	const _NO = 0;

	const PACKAGE_NORMAL = "NORMAL";
	const PACKAGE_VIP = "VIP";

    /************************************/
    /*****          STATUS         ******/
    /************************************/
	const STATUS_ACTIVE = 'ACTIVE';
	const STATUS_INACTIVE = 'INACTIVE';
	const STATUS_PENDING = 'PENDING';
	const STATUS_CANCEL = 'CANCEL';
	const STATUS_REJECT = 'REJECT';
	const STATUS_APPROVE = 'APPROVE';
	const STATUS_COMPLETE = 'COMPLETE';

    /*************************/
    /*****    ROLE      ******/
    /*************************/
	const ROLE_DISTRIBUTOR = 'DISTRIBUTOR';
	const ROLE_ADMIN = 'ADMIN';
	const ROLE_SUPERADMIN = 'SUPERADMIN';

    /*************************/
    /*****    SESSION   ******/
    /*************************/
	const SESSION_DISTID = 'MAPLEGOLDS_DISTID';
	const SESSION_ADMINID = 'MAPLEGOLDS_ADMINID';
	const SESSION_USERNAME = 'MAPLEGOLDS_USERNAME';
	const SESSION_USERID = 'MAPLEGOLDS_USERID';
	const SESSION_USERTYPE = 'MAPLEGOLDS_USERTYPE';
    const SESSION_CPS_PRICE = 'MAPLEGOLDS_CPS_PRICE';
    const SESSION_GOLD_PRICE = 'MAPLEGOLDS_GOLD_PRICE';
    const SESSION_MENU_IDX = 'MAPLEGOLDS_MENU_IDX';
    const SESSION_ADMIN_MENU_IDX = 'MAPLEGOLDS_ADMIN_MENU_IDX';
    const SESSION_NICKNAME = 'MAPLEGOLDS_NICKNAME';

    /*************************/
    /*****    ACCOUNT   ******/
    /*************************/
    const ACCOUNT_TYPE_RANK = 'RANK';
    const ACCOUNT_TYPE_ECASH = 'ECASH';
    const ACCOUNT_TYPE_EPOINT = 'EPOINT';
    //const ACCOUNT_TYPE_CPS = 'CPS';
    const ACCOUNT_TYPE_TRADING_POINT = 'TRADING_POINT';
    const ACCOUNT_TYPE_GOLD = 'GOLD';
    const ACCOUNT_TYPE_ESHARE = 'ESHARE';
    const ACCOUNT_TYPE_MAINTENANCE = 'MAINTENANCE';
    const ACCOUNT_TYPE_FOREX = 'FOREX';

    /*******************************/
    /*****    ACCOUNT LEDGER  ******/
    /*******************************/
    const ACCOUNT_LEDGER_ACTION_REGISTER = 'REGISTER';
    const ACCOUNT_LEDGER_ACTION_DIVIDEND = 'DIVIDEND';
    const ACCOUNT_LEDGER_ACTION_PURCHASE = 'PURCHASE';
    const ACCOUNT_LEDGER_ACTION_SELL = 'SELL';
    const ACCOUNT_LEDGER_ACTION_SELL_ESHARE = 'SELL ESHARE';
    const ACCOUNT_LEDGER_ACTION_SELL_EGOLD = 'SELL GOLD';
    const ACCOUNT_LEDGER_ACTION_BUY = 'BUY';
    const ACCOUNT_LEDGER_ACTION_BUY_ESHARE = 'BUY ESHARE';
    const ACCOUNT_LEDGER_ACTION_BUY_EGOLD = 'BUY GOLD';
    const ACCOUNT_LEDGER_ACTION_TRANSFER = 'TRANSFER';
    const ACCOUNT_LEDGER_ACTION_TRANSFER_TO = 'TRANSFER TO';
    const ACCOUNT_LEDGER_ACTION_PROCESS_CHARGE = 'PROCESS CHARGES';
    const ACCOUNT_LEDGER_ACTION_TRANSFER_FROM = 'TRANSFER FROM';
    const ACCOUNT_LEDGER_ACTION_REINVEST_CPS = 'REINVEST';
    const ACCOUNT_LEDGER_ACTION_CONVERT_ECASH = 'CONVERT ECASH';
    const ACCOUNT_LEDGER_ACTION_REDEEM = 'REDEEM';
    const ACCOUNT_LEDGER_ACTION_WITHDRAWAL = 'WITHDRAWAL';
    const ACCOUNT_LEDGER_ACTION_DAILY_BONUS = 'DAILY BONUS';
    const ACCOUNT_LEDGER_ACTION_MONTHLY_BONUS = 'MONTHLY BONUS';
    const ACCOUNT_LEDGER_ACTION_ADJUSTMENT = 'ADJUSTMENT';
    const ACCOUNT_LEDGER_ACTION_DEPOSIT = 'DEPOSIT';
    const ACCOUNT_LEDGER_ACTION_DSB = 'DSB';
    const ACCOUNT_LEDGER_ACTION_GDB = 'GDB';
    const ACCOUNT_LEDGER_ACTION_GMB = 'GMB';
    const ACCOUNT_LEDGER_ACTION_REFUND = 'REFUND';
    const ACCOUNT_LEDGER_ACTION_MAINTENANCE = 'MAINTENANCE';
    const ACCOUNT_LEDGER_ACTION_ADVANCE = 'COMPANY';
    const ACCOUNT_LEDGER_ACTION_PACKAGE_UPGRADE = 'PACKAGE UPGRADE';
    const ACCOUNT_LEDGER_ACTION_CONVERT_EPOINT = 'CONVERT EPOINT';
    const ACCOUNT_LEDGER_ACTION_CONVERT = 'CONVERT';

    /*******************************/
    /*****    ACCOUNT LEDGER  ******/
    /*******************************/
    const SETTING_DAILY_BONUS = 'DAILY_BONUS';
    const SETTING_MONTHLY_BONUS = 'MONTHLY_BONUS';
    const SETTING_CPS = 'CPS';
    const SETTING_SERVER_MAINTAIN = 'SERVER_MAINTAIN';
    const SETTING_SHARE_MARKET = 'SHARE_MARKET';
    const SETTING_GOLD_MARKET = 'GOLD_MARKET';
    const SETTING_GOLD_MARKET_FORCE_CLOSE = 'GOLD_MARKET_FORCE_CLOSE';
    const SETTING_TRANSFER_PROCESS_FEE = 'TRANSFER_PROCESS_FEE';

    /*************************************/
    /*****      COMMISSION          ******/
    /*************************************/
    const COMMISSION_TYPE_DSB = 'DSB';
    const COMMISSION_TYPE_GDB = 'GDB';
    const COMMISSION_TYPE_GMB = 'GMB';

    /*************************************/
    /*****   COMMISSION LEDGER      ******/
    /*************************************/
    const COMMISSION_LEDGER_REGISTER = 'REGISTER';
    const COMMISSION_LEDGER_PAIRED = 'PAIRED';
    const COMMISSION_LEDGER_WITHDRAW = 'WITHDRAW';

    /*************************************/
    /*****   WITHDRAWAL      ******/
    /*************************************/
    const WITHDRAWAL_PENDING = 'PENDING';
    const WITHDRAWAL_PROCESSING = 'PROCESSING';
    const WITHDRAWAL_REJECTED = 'REJECTED';
    const WITHDRAWAL_PAID = 'PAID';

    /*************************************/
    /*****   PAIRING LEDGER      ******/
    /*************************************/
    const PAIRING_LEDGER_REGISTER = 'REGISTER';
    const PAIRING_LEDGER_FLUSH = 'FLUSH';
    const PAIRING_LEDGER_PAIRED = 'PAIRED';

    /*******************************/
    /*****    Placement  ******/
    /*******************************/
    const PLACEMENT_LEFT = 'LEFT';
    const PLACEMENT_RIGHT = 'RIGHT';

    /*******************************/
    /*****    Email  ******/
    /*******************************/
    const EMAIL_HOST = "maplegolds.com";
    const EMAIL_FROM_NOREPLY = "noreply@maplegolds.com";
    const EMAIL_FROM_NOREPLY_NAME = "Maplegolds International Group";

    /*******************************/
    /*****   Daily Bonus Log  ******/
    /*******************************/
    const DAILY_BONUS_LOG_TYPE_DAILY = 'DAILY';

    /*******************************/
    /*****   EGOLD  ******/
    /*******************************/
    const EGOLD_ACCOUNT_STATUS_ACTIVE = 'ACTIVE';
    const EGOLD_ACCOUNT_STATUS_COMPLETE = 'COMPLETE';

    /*******************************/
    /*****   EShare  ******/
    /*******************************/
    const ESHARE_SPLIT_SELL_UNIT = '30,20,20,20,10';
    const ESHARE_SPLIT_SELL_DAY = '15,30,45,60,75';
    const ESHARE_ACCOUNT_STATUS_ACTIVE = 'ACTIVE';
    const ESHARE_ACCOUNT_STATUS_COMPLETE = 'COMPLETE';

    const ESHARE_WAITING_STATUS_ACTIVE = 'ACTIVE';
    const ESHARE_WAITING_STATUS_CANCEL = 'CANCEL';
    const ESHARE_WAITING_STATUS_EXPIRED = 'EXPIRED';
    const ESHARE_WAITING_STATUS_MATCHED = 'MATCHED';
    const ESHARE_WAITING_STATUS_PARTIAL_MATCH = 'PARTIAL MATCH';

    const REINVEST_AMOUNT = 500;

    const PATH_VERIFICATION = 'verification';

    const PIN_ACTION_REGISTER = 'register';
    const PIN_ACTION_TRANSFER = 'transfer';
    const PIN_ACTION_REINVEST = 'reinvest';

    const REINVEST_CPS_DAYS = 21;
    const REINVEST_GAP_MULTIPLY = 3;
    const REFRESH_GOLD_INTEVAL = 60000;  // 10 sec
    const GRAM_TO_TROY_OUNCES = 0.0321507466; //1 gram = 0.0321507466 troy ounces
    const PACKAGE_PINS = "5,10,20,30,50,100";
    const FIRST_REGISTERED_DISTRIBUTOR_CODE = "TV1";
    const FIRST_REGISTERED_DISTRIBUTOR_ID = 1;
    const CPS_PER_GRAM_OF_GOLD = 500;

    /*******************************/
    /*****   GROUP LEADER   ******/
    /*******************************/
    const GROUP_LEADER = "CNTV01,92858323,41365507,CNTV0001";

    /************************************/
    /****    DIVIDEND STATUS       ******/
    /************************************/
	const DIVIDEND_STATUS_ACTIVE = 'ACTIVE';
	const DIVIDEND_STATUS_COMPLETE = 'COMPLETE';
	const DIVIDEND_TIMES_ENTITLEMENT = 52;

    /************************************/
    /****    FOREX
     * Once new member joined, we give 24 months x gold dividend (500 CPS = 1g, 1g = USD 80)
     * , means USD 1,920 in FOREX BALANCE, let them bet on FOREX. ******/
    /************************************/
	const FOREX_MONTHS = 24;
	const FOREX_VALUE_PER_GOLD = 80;
}